package com.fs.system.student.mapper;

import com.fs.system.student.domain.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface StudentMapper {

    /**
     * 获取学生信息
     * @return
     */
    List<Student> getStudentInfo(Student student);

    /**
     * 修改学生信息
     * @param student
     * @return
     */
    void updateStudentInfo(Student student);

    Student selectByUsername(String username);

    /**
     * 根据学号查询学生信息
     * @param stuId
     * @return
     */
    Student selectStudentById(Long stuId);



    int insert(Student student);

    void updateStudentIsDeleted(@Param("stuId") Long stuId, @Param("updateBy") String updateBy);


    Integer countStudentByUpdateTime(LocalDateTime startOfDay, LocalDateTime endOfDay, Long collegeId);

    /**
     * 添加学分的方法
     *
     * @param creditCount
     * @param stuId
     */
    void addCredit(Long creditCount, Long stuId);
}
